<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户首页</title>
    <script src="/scripts/jquery-3.3.1.min.js"></script>
    <link href="/css/myUIstyle.css" rel="stylesheet" />
    <script src="/scripts/base/base.js"></script><!--菜单布局 -->
    <script src="/scripts/jquery.validate.min.js"></script>
    <script src="/scripts/messages_zh.min.js"></script>
    <script src="/scripts/user/findBook.js"></script>
</head>
<body>

<div class="top">
    <div class="dropdown" style="float: right">
        <button class="dropbtn"><b th:text="${session.user.getUserName()}"></b></button>
        <div class="dropdown-content">
            <a href="#">功能1</a>
            <a href="#">功能2</a>
            <a href="/userLogOut">退出</a>
        </div>

    </div>
</div>
<ul>
    <li id="click_1"><a href="#">借阅管理</a></li>
    <div class="funBackgroungColor">
        <li id="fun1" class="hidden"><a href="/userBorrowingBooksPage?pageNum=1">借书记录</a></li>
        <li id="fun2" class="hidden"><a href="/borrowingPage">借阅书籍</a></li>

    </div>
    <li id="click_2"><a href="#">书籍管理</a></li>
    <div class="funBackgroungColor">
        <li id="fun3" ><a href="/userReturnBooksPage">归还书籍</a></li>
        <li id="fun4"  style="background-color: #555"><a href="/findBookPage">查询书籍</a></li>
    </div>
    <li id="click_3"><a href="#">个人信息</a></li>
    <div class="funBackgroungColor">
        <li id="fun5" class="hidden"><a href="/userMessagePage">我的信息</a></li>
        <li id="fun6" class="hidden"><a href="#">功能6</a></li>
    </div>
    <li id="click_4"><a href="#">帮助</a></li>
    <div class="funBackgroungColor">
        <li id="fun7" class="hidden"><a href="#">功能7</a></li>
        <li id="fun8" class="hidden"><a href="#">功能8</a></li>
    </div>
</ul>

<div style="margin-left:18%;padding:1px 16px;">
    <div style="float: left;width: 50%;height: 100%"><!--左半部分-->
        <h3 style="text-align:left">查询书籍</h3>
        <form action="/findBookByName" id="findBookByNameForm">
            <label>请输入书名</label><br>
            <input type="text" name="bookName"><br><br>
            <input type="submit" value="查询" style="background-color: #aaaaaa;color: white;">
        </form>
    </div>
    <div style="float: left;width: 50%;height: 100%"><!--右半部分-->
        <h3 style="text-align: left">查询结果</h3>
        <table>
            <tr>
                <th>id</th>
                <th>书名</th>
                <th>作者</th>
                <th>出版社</th>
                <th>状态</th>
            </tr>
            <tr th:each="book:${bookList}">
               <td><label th:text="${book.getBookId()}"></label></td>
                <td><label th:text="${book.getBookName()}"></label></td>
                <td><label th:text="${book.getBookAuthor()}"></label></td>
                <td><label th:text="${book.getBookPublish()}"></label></td>
                <td><label th:text="${book.getIsExist()}"></label></td>
            </tr>
        </table>
    </div>
</div>
</body>
</html>
